kill @s
kill @e[type=item,distance=..2,limit=1,nbt={Item:{id:"minecraft:charcoal",Count:1b}}]
summon item ~ ~0.8 ~ {Item:{id:"minecraft:gunpowder",Count:1b}}